<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex、table布局</title>
    <style>
        .flex-outer {
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: darkviolet;
            height: 100px;
        }
        
        .flex-inner {
            background-color: deeppink;
        }
        
        .grid-outer {
            display: grid;
            align-items: center;
            justify-content: center;
            background-color: deepskyblue;
            margin: 100px;
            height: 100px;
        }
        
        .grid-inner {
            background-color: forestgreen;
        }
    </style>
</head>

<body>
    <h1>flex、table布局比较类似</h1>
    <div class="flex-outer">
        <div class="flex-inner">
            flex垂直居中定位
        </div>
    </div>
    <div class="grid-outer">
        <div class="grid-inner">grif垂直居中</div>
    </div>

</body>

</html>